<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="qaPatrolId" name="qaPatrolId" th:value="${qaPatrol.qaPatrolId}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-3 control-label">巡查时间：</label>
								<div class="col-sm-8">
									<input id="patrolDate" name="patrolDate"  class="form-control" type="text" autocomplete="off">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">产品批次：</label>
								<div class="col-sm-8">
									<input id="batch" name="batch" th:value="${qaPatrol.batch}" class="form-control" type="text" autocomplete="off">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">产品名称：</label>
								<div class="col-sm-4">
									<select id="productId" name="productId" class="form-control">
									</select>
								</div>
								<div class="col-sm-4 input-group">
									<input type="text" id="checkProductName" class="form-control" placeholder="搜索产品名称"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="getProductsByUpdate()">搜索
                                        </button> </span>
								</div>
							</div>
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">巡查产线：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="patrolProductLines" name="patrolProductLines" th:value="${qaPatrol.patrolProductLines}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">产线类型：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<select id="abnormalSituation" name="abnormalSituation" onchange="changeDiv()"-->
											<!--th:value="${qaPatrol.abnormalSituation}" class="form-control">-->
									<!--</select>-->
								<!--</div>-->
							<!--</div>-->

							<!--&lt;!&ndash; 玻璃瓶线 &ndash;&gt;-->
							<!--<div id="glass" hidden="hidden">-->
								<!--<div class="form-group">-->
									<!--<label class="col-sm-3 control-label">杀菌时间：</label>-->
									<!--<div class="col-sm-8">-->
										<!--<input id="sterilizationDate" name="sterilizationDate" th:value="${qaPatrol.sterilizationDate}" class="form-control" type="text" autocomplete="off">-->
									<!--</div>-->
								<!--</div>-->
								<!--<div class="form-group">-->
									<!--<label class="col-sm-3 control-label">物料中心温度：</label>-->
									<!--<div class="col-sm-8">-->
										<!--<input id="materialCenterTemperature" name="materialCenterTemperature" th:value="${qaPatrol.materialCenterTemperature}" class="form-control" type="text">-->
									<!--</div>-->
								<!--</div>-->
								<!--<div class="form-group">-->
									<!--<label class="col-sm-3 control-label">水温：</label>-->
									<!--<div class="col-sm-8">-->
										<!--<input id="waterTemperature" name="waterTemperature" class="form-control" th:value="${qaPatrol.waterTemperature}" type="text">-->
									<!--</div>-->
								<!--</div>-->
							<!--</div>-->
							<!--&lt;!&ndash; 塑料瓶线 &ndash;&gt;-->
							<!--<div id="plastic" hidden="hidden">-->
								<!--<div class="form-group">-->
									<!--<label class="col-sm-3 control-label">脱盐水水温：</label>-->
									<!--<div class="col-sm-8">-->
										<!--<input id="desaltingWaterTemperature" name="desaltingWaterTemperature" th:value="${qaPatrol.desaltingWaterTemperature}" class="form-control" type="text">-->
									<!--</div>-->
								<!--</div>-->
								<!--<div class="form-group">-->
									<!--<label class="col-sm-3 control-label">物料温度：</label>-->
									<!--<div class="col-sm-8">-->
										<!--<input id="materialTemperature" name="materialTemperature" th:value="${qaPatrol.materialTemperature}" class="form-control" type="text">-->
									<!--</div>-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">检查人 默认登陆用户：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="checkBy" name="checkBy" th:value="${qaPatrol.checkBy}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="createBy" name="createBy" th:value="${qaPatrol.createBy}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="createDate" name="createDate" th:value="${qaPatrol.createDate}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="state" name="state" th:value="${qaPatrol.state}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
							<!--<div class="form-group">-->
								<!--<label class="col-sm-3 control-label">产品规格：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="productSpecification" name="productSpecification" th:value="${qaPatrol.productSpecification}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->

							<div class="form-group">
								<label class="col-sm-3 control-label">其他异常情况：</label>
								<div class="col-sm-8">
									<input id="otherAbnormalSituation" name="otherAbnormalSituation" th:value="${qaPatrol.otherAbnormalSituation}" class="form-control" type="text">
								</div>
							</div>
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<!--<script type="text/javascript">-->
        <!--laydate.render({-->
            <!--elem: '#patrolDate', //指定元素-->
            <!--type: 'datetime'-->
        <!--});-->
	<!--</script>-->
	<script type="text/javascript" th:inline="javascript">

		function setPatrolDate() {
			var patrolDate = [[${qaPatrol.patrolDate}]]
			var newDate = new Date(patrolDate)
			var result = DateFormat.format(newDate, 'yyyy-MM-dd hh:mm:ss')
			laydate.render({
				elem: '#patrolDate', //指定元素
				type: 'datetime',
				value: result
			});
		}
		function getProductsId() {
			return [[${qaPatrol.productId}]];
		}

		// function setAbnormalSituation() {
        //     var abnormalSituation = [[${qaPatrol.abnormalSituation}]]
		// 	var htmlText ='';
        //     $("#abnormalSituation").empty();
			// if(abnormalSituation == 0){
            //     htmlText+= '<option value="0" selected="selected">玻璃瓶线</option>'
            //     htmlText+= '<option value="1">塑料瓶线</option>'
            //     $("#glass").show();
            //     $("#plastic").hide();

//                var sterilizationDate = [[${qaPatrol.sterilizationDate}]]
//				var nDate = new Date(sterilizationDate);
//                var result = DateFormat.format(nDate, 'yyyy-MM-dd hh:mm:ss')
//                laydate.render({
//                    elem: '#sterilizationDate', //指定元素
//                    type: 'datetime',
//                    value: result
//                });
//
// 			}else{
//                 htmlText+= '<option value="0">玻璃瓶线</option>'
//                 htmlText+= '<option value="1" selected="selected">塑料瓶线</option>'
//                 $("#glass").hide();
//                 $("#plastic").show();
// 			}
//             $("#abnormalSituation").append(htmlText)
//         }

        // function changeDiv() {
        //     var abnormalSituation = $("#abnormalSituation option:selected").val();
        //     if (abnormalSituation == 0){
        //         $("#glass").show();
        //         $("#plastic").hide();
        //     }else if (abnormalSituation == 1){
        //         $("#glass").hide();
        //         $("#plastic").show();
        //     }
        // }
	</script>
	<script type="text/javascript"  th:src="@{/js/appjs/qa/qaPatrol/edit.js}" src="/js/appjs/qa/qaPatrol/edit.js">
	</script>
</body>
</html>
